﻿@model ListViewModel<CommonSearchValues, IQueryable<SmsSent>>
@{
    ViewBag.Title = "发送短信查询";
}
@using (Ajax.BeginForm("SentSms", new { IsView=false}, new AjaxOptions { HttpMethod = "Post", LoadingElementId = "OnLoadingSpan", UpdateTargetId = "main", OnFailure = "OnSiteError" }))
{<p>
    <fieldset>
        <legend>
            <div class="catalog-title">
                发送短信查询</div>
        </legend>
@*        <table class="width">
            <tr>
                <td valign="middle">
*@                    @Html.HiddenFor(m => Model.PageSize)
                   <input type="hidden" name="PageIdx" id="qspidx" value="0" />   
                    @*患者：@Html.DropDownListFor(m => m.SearchFrom.V2, new SelectList(ViewBag.Recupers, Model.SearchFrom.V2), "全部")*@
                    
                     <span  class="small-input" >接收人：@Html.EditorFor(m => m.SearchFrom.V2)</span> 
                      <span  class="small-input" >接收电话：@Html.EditorFor(m => m.SearchFrom.V4)</span> 
                     <span  class="small-input" >短信类型：@Html.DropDownListFor(m => m.SearchFrom.V3, new SelectList(ViewBag.SmsTypes, Model.SearchFrom.V3), "全部")</span>
                    发送时间：@Html.EditorFor(m => m.SearchFrom.V1, "DateTimeStr")
                    至：@Html.EditorFor(m => m.SearchTo.V1, "DateTimeStr")
                    @Helpers.SubmitButton("查询", "qssubmit")
@*                </td>
                <td align="right" valign="middle">
                    <div class="icons icons-add">
                        @Ajax.ActionLink("短信留言", "SentSmsEdit", new { utid = "main" }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('短信留言');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })
                    </div>
                </td>
            </tr>
        </table>*@
    </fieldset>
    </p>
}
<table class="width">
    <tr>
        <th>
            发送者
        </th>
        <th>
            接收方
        </th>
        <th>
            接收方电话
        </th>
        <th>
            短信类型
        </th>
        <th>
            短信内容
        </th>
        <th>
            发送时间
        </th>
        <th>
            状态
        </th>
    </tr>
    @{int dColor = 0;}
    @foreach (var item in Model.Data)
    {
        <tr class="tr-backColor@(dColor++%2)">
            <td>@Html.DisplayFor(model => item.SenderName)
            </td>
            <td>@Html.DisplayFor(model => item.ReceiverName)
            </td>
            <td>@Html.DisplayFor(model => item.ReceiverCode)
            </td>
            <td>@Html.DisplayFor(model => item.SmsType)
            </td>
            <td>@Html.DisplayFor(model => item.TextMessage)
            </td>
            <td>@Html.DisplayFor(model => item.SentTime)
            </td>
            <td>@Html.DisplayFor(model => item.ProcStatus)
            </td>
        </tr>
    }
</table>
@Html.Partial("Pagger", new PaggerViewModel { Act = "SentSms", PageIdx = Model.PageIdx, PageCount = Model.PageCount, ItemCount = Model.ItemCount })

